// var Mock = require('mockjs')


var datas = [
    {
        url: '/project/list',
        type: 'get',
        response: function (config) {
            console.log(config)
            // const items = data.items
            return {
                code: 1,
                data: {
                    total: 2,
                    items: [{
                        id: 1,
                        name: '内部项目1',
                        staff: '王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎',
                        depart: '运营部',
                        manager: '王小虎',
                        state: true,
                        is_update: 1,
                        is_delete: 1,
                    },
                    {
                        id: 2,
                        name: '项目2',
                        staff: '王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎',
                        depart: '运营部',
                        manager: '王小虎',
                        state: true,
                        is_update: 1,
                        is_delete: 1,
                    },
                    {
                        id: 3,
                        name: '项目3',
                        staff: '王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎',
                        depart: '运营2部',
                        manager: '王小虎',
                        state: true,
                        is_update: 1,
                        is_delete: 1,
                    },
                    {
                        id: 4,
                        name: '项目4',
                        staff: '王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎、王小虎',
                        depart: '运营3部',
                        manager: '王小虎',
                        state: false,
                        is_update: 1,
                        is_delete: 1,
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/project/rename',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        url: '/project/status',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        // 项目看板
        url: '/project/detail',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 1,
                    name: '测试项目101',
                    month_target: 188888,
                    month_finish: '80%',
                    day_target: 6000,
                    day_finish: 6100,
                    day_difference:1322,
                    status: 1,
                    users:[
                        {
                            id: 1,
                            name: '张三'
                        },
                        {
                            id: 2,
                            name: '李四'
                        }
                    ]
                },
            }
        }
    },
    {
        // 项目账户
        url: '/project/account',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 3,
                    items: [
                        {
                            id: 1,
                            account: '账户A',
                            optimizer: '张三',
                            optimizerid: 1
                        },
                        {
                            id: 2,
                            account: '账户B',
                            optimizer: '李四',
                            optimizerid: 2
                        }
                    ]
                }
            }
        }
    },
    {
        // 分配优化师
        url: '/project/account/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        // 添加项目人员
        url: '/project/user/list',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        // 删除项目人员
        url: '/project/account/remove',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        // 项目人员
        url: '/project/user',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 3,
                    items: [
                        {
                            id: 1,
                            name: '张三',
                        },
                        {
                            id: 2,
                            name: '李四',
                        },
                        {
                            id: 3,
                            name: '王五',
                        },
                    ]
                }
            }
        }
    },
    // {
    //     url: '/project/report',
    //     type: 'get',
    //     response: function() {
    //         return {
    //             code: 1,
    //             data: {
    //                 title: {
    //                     text: ''
    //                 },
    //                 tooltip: {
    //                     trigger: 'axis',
    //                     axisPointer: {
    //                         type: 'cross',
    //                         label: {
    //                             backgroundColor: '#6a7985'
    //                         }
    //                     }
    //                 },
    //                 legend: {
    //                     data: ['转化数', '转化成本']
    //                 },
    //                 toolbox: {
    //                     feature: {
    //                         saveAsImage: {}
    //                     }
    //                 },
    //                 grid: {
    //                     left: '3%',
    //                     right: '4%',
    //                     bottom: '3%',
    //                     containLabel: true
    //                 },
    //                 xAxis: [{
    //                     type: 'category',
    //                     boundaryGap: false,
    //                     data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
    //                 }],
    //                 yAxis: [{
    //                     type: 'value'
    //                 }],
    //                 series: [{
    //                     name: '转化数',
    //                     type: 'line',
    //                     stack: '总量',
    //                     // areaStyle: {},
    //                     data: [120, 132, 101, 134, 90, 230, 210]
    //                 },
    //                 {
    //                     name: '转化成本',
    //                     type: 'line',
    //                     stack: '总量',
    //                     // areaStyle: {},
    //                     data: [220, 182, 191, 234, 290, 330, 310]
    //                 }
    //                 ]
    //             }
    //         }
    //     }
    // },
    {
        url: '/project/target/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    // {
    //     // 任务列表 =》 使用 home.js中的/task/list接口
    //     url: '/project/task/list',
    //     type: 'get',
    //     response: function () {
    //         return {
    //             code: 1,
    //             data: {
    //                 total: 30,
    //                 items: [
    //                     {
    //                         id: 10,
    //                         content: '今天的任务1',
    //                         user: '小张',
    //                         completeState: '未完成'
    //                     },
    //                     {
    //                         id: 11,
    //                         content: '今天的任务2',
    //                         user: '小王',
    //                         completeState: '未完成'
    //                     },
    //                     {
    //                         id: 13,
    //                         content: '今天的任务3',
    //                         user: '小李',
    //                         completeState: '未完成'
    //                     },
    //                 ]
    //             },
    //         }
    //     }
    // },
    {
        // 完成任务
        url: '/task/finish',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        // 新建任务
        url: '/task/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        url: '/project/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        // 发布公告
        url: '/message/send',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success',
            }
        }
    },
    {
        url: '/project/manager/list',
        type: 'get',
        response: function (config) {
            console.log(config)
            // const items = data.items
            return {
                code: 1,
                data: {
                    total: 2,
                    items: [{
                        id: 1,
                        name: '王小虎',
                    },
                    {
                        id: 2,
                        name: '张三',
                    },
                    {
                        id: 3,
                        name: '李四',
                    },
                    {
                        id: 4,
                        name: '王五',
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/directional/list',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 1,
                    items: [{
                        id: 1,
                        name: '定向包定向包定向包',
                        description: '江苏地区人群',
                        update_time: '2019-09-20',
                    },
                    {
                        id: 2,
                        name: '定向包定向包定向包定向包定向包',
                        description: '女性用户',
                        update_time: '2019-10-20',
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/directional/detail',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 2,
                    name: '定向包定向包定向包定向包定向包',
                    description: '女性用户',
                    update_time: '2019-10-20',
                }
            }
        }
    },
    {
        url: '/directional/copy',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/directional/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    }, 
    {
        url: '/directional/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/creative/list',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 2,
                    items: [{
                        id: 1,
                        creative_name: '标题标题1',
                        creative_describe: '描述描述1',
                        creative_time: '2029-09-20',
                    },
                    {
                        id: 2,
                        creative_name: '标题标题标题标题2',
                        creative_describe: '描述描述描述2',
                        creative_time: '2019-09-20',
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/creative/detail',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 2,
                    creative_name: '标题标题标题标题2',
                    creative_describe: '描述描述描述2',
                    creative_time: '2019-09-20',
                }
            }
        }
    },
    {
        url: '/creative/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/creative/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/implement/list',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 3,
                    items: [{
                        id: 1,
                        account: 'dfsasd@qq.com',
                        code: '98731144429',
                        principal: '张三',
                        direction: '抖音',
                        imptime: '2019-09-20',
                        impstate: '上传中'
                    },
                    {
                        id: 2,
                        account: '32132d@163.com',
                        code: '98731349870',
                        principal: '李四',
                        direction: '服装',
                        imptime: '2019-09-20',
                        impstate: '上传成功'
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/tast/total/list',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 4,
                    items: [{
                        id: 1,
                        tast_name: '抖音任务完成30万',
                        tast_staff: '张三',
                        tast_progress: '80%',
                        provisions_time: '2019-09-20',
                        update_time: '2019-09-28'
                    },
                    {
                        id: 2,
                        tast_name: '头条任务完成40万',
                        tast_staff: '李四',
                        tast_progress: '70%',
                        provisions_time: '2019-10-20',
                        update_time: '2019-10-28'
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/library/list',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 5,
                    items: [{
                        id: 1,
                        video: 'https://www.runoob.com/try/demo_source/movie.mp4',
                        time: '2031-09-32 10:32',
                        file_type:'video_h',
                        title: 'xxxxx'
                    },
                    {
                        id: 2,
                        img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
                        time: '2031-09-32 10:33',
                        file_type: 'video_v',
                        title: 'bbbb'
                    }, {
                        id: 3,
                        video: 'https://www.runoob.com/try/demo_source/movie.mp4',
                        time: '2031-09-32 10:32',
                        file_type: 'video_h',
                        title: 'xxxxx'
                    },
                    {
                        id: 4,
                        img: 'https://sf6-ttcdn-tos.pstatp.com/obj/mosaic-legacy/2ebc50008b16d2a9ed09b',
                        time: '2031-09-32 10:33',
                        file_type: 'image_h',
                        title: 'bbbb'
                    }, {
                        id: 5,
                        video: 'https://www.runoob.com/try/demo_source/movie.mp4',
                        time: '2031-09-32 10:32',
                        file_type: 'image_v',
                        title: 'xxxxx'
                    },
                    {
                        id: 6,
                        img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
                        time: '2031-09-32 10:33',
                        file_type: 'image_v',
                        title: 'bbbb'
                    },
                    ]
                }
            }
        }
    },
    {
        url: '/library/push',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/library/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/titile',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 6,
                    items: [{
                        id: 1,
                        title: '标题标题1',
                        update_time: '2020-11-30'
                    },
                    {
                        id: 2,
                        title: '标题标题标题2',
                        update_time: '2020-03-30'
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/titile/add',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/titile/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/label',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 7,
                    items: [{
                        id: 1,
                        title: '标题标题1',
                        content: '裤子、衣服、母婴',
                        update_time: '2020-11-30'
                    },
                    {
                        id: 2,
                        title: '标题标题标题2',
                        content: 'T恤、袜子、鞋子',
                        update_time: '2020-03-30'
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/label/add',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/label/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/project/adgroup',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    total: 8,
                    items: [{
                        id: 1,
                        campaign_name: '名称111',
                        update_time: '2019-32-32 20:32',
                        status: '上传中'
                    },
                    {
                        id: 2,
                        campaign_name: '名称222',
                        update_time: '2019-10-32 20:32',
                        status: '上传成功'
                    },
                    {
                        id: 3,
                        campaign_name: '名称333',
                        update_time: '2019-09-32 20:32',
                        status: '新建'
                    }
                    ]
                }
            }
        }
    },
    {
        url: '/adgroup/detail',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 3,
                    campaign_name: '名称333',
                    budget_mode: 1,
                    budget: 38892,
                    landing_type: 'LINK',
                    update_time: '2019-09-32 20:32'
                }
            }
        }
    },
    {
        url: '/adgroup/copy',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/adgroup/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 1,
                }
            }
        }
    },
    {
        url: '/adgroup/plan/detail',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    id: 100,
                    id_campaign: 0,
                    interest_action_mode: 'UNLIMITED',
                    PutTarget: 1,
                    PutContent: 1,
                    directLink: 1,
                    external_url: 'http://www.baidu.com',
                    id_direct_packet: '', // 本地定向包ID
                    creative: '',
                    media_nums: '3',
                    title_nums: '3',
                    actiontext: '444',
                    direct_action_scene: ['E-COMMERCE'],
                    direct_action_days: 7,
                    direct_action_categories: [],
                    direct_action_words: [],
                    direct_interest_categories: [],
                    direct_interest_words: [],
                    cpa_bid: 0,
                    deep_cpabid: 0,
                }
            }
        }
    },
    {
        url: '/adgroup/plan/save',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'succces'
            }
        }
    },
    {
        url: '/adgroup/delete',
        type: 'post',
        response: function () {
            return {
                code: 1,
                msg: 'success'
            }
        }
    },
    {
        url: '/upload',
        type: 'post',
        response: function () {
            return {
                code: 1,
                data: {
                    file: 'https://www.baidu.com/img/flexible/logo/pc/result@2.png',
                }
            }
        }
    },
    // /adgroup/status
    {
        url: '/adgroup/status',
        type: 'get',
        response: function () {
            return {
                code: 1,
                data: {
                    adplan_num: 20,
                    success_num: 13,
                    failure_num: 7,
                    failure_cause: '失败原因失败原因失败原因失败原因失败原因失败原因'
                }
            }
        }
    },
]
module.exports = datas